<?php
// +----------------------------------------------------------------------
// | OneKeyAdmin [ Believe that you can do better ]
// +----------------------------------------------------------------------
// | Copyright (c) 2020-2023 http://onekeyadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: MUKE <513038996@qq.com>
// +----------------------------------------------------------------------
namespace plugins\kdniao\api\controller;

use app\api\BaseController;
use app\api\model\Config;
use app\api\model\User;
use plugins\kdniao\addons\Kdniao;
/**
 * 物流查询
 */
class Index extends BaseController
{
    /**
     * 订单物流
     */
    public function index()
    {
        if ($this->request->isPost()) {
            $input = input('post.');
            $data  = [];
            if (!empty($input['company_code']) && !empty($input['code'])) {
                $res  = Kdniao::select($input['company_code'], $input['code']);
                $data = $res['data'];
            }
            return json(['status' => 'success', 'message' => '获取成功', 'data' => $data]);
        }
    }
}